package file;

import java.io.File;
import java.io.PrintWriter;

public class PrintWriteDemo2 {
    public static void main(String[] args) {
        File file = new File("D:/temp/e.txt");
        try(PrintWriter writer = new PrintWriter(file)){
            writer.println("你好");
            writer.println("Java45班");
            writer.println("比特科技");
            writer.flush();
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
